﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CPPEI.WorkflowCore
{
    /// <summary>
    /// 流程运行的状态
    /// </summary>
    public class State
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 流程的节点信息
        /// </summary>
        public Activity Activity { get; private set; }

        /// <summary>
        /// 该状态的任务应该此人处理
        /// </summary>
        public ActorCollection Actors { get; set; }

        public Guid? ParentId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="node">流程的节点信息</param>
        public State(Activity activity)
        {
            this.Id = Guid.NewGuid();
            this.Activity = activity;
            this.Actors = new ActorCollection();
        }
    }
}
